package org.coopac.service.impl;

import java.util.List;

import org.coopac.dao.IPersonaDAO;
import org.coopac.model.CoopacPersona;
import org.coopac.service.IPersonaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Transactional
@Service("personaService")
public class PersonaService implements IPersonaService {
	
	@Autowired
	private IPersonaDAO personaDAO;
	
	@Override
	public List<CoopacPersona> listar() {
		return personaDAO.listar();
	}

	@Override
	public void save(CoopacPersona persona) {
		personaDAO.save(persona);
	}

	@Override
	public void update(CoopacPersona persona) {
		personaDAO.update(persona);
	}

	@Override
	public void delete(CoopacPersona persona) {
		personaDAO.delete(persona);
	}

	@Override
	public CoopacPersona getById(int id) {
		return personaDAO.getById(id);
	}

	@Override
	public List<String> listarPersonaDocumento() {
		return personaDAO.listarPersonaDocumento();
	}

}
